package org.linlinjava.litemall.db.service;

import java.time.LocalDateTime;
import java.util.List;

import javax.annotation.Resource;

import org.linlinjava.litemall.db.dao.LitemallShopCheckItemMapper;
import org.linlinjava.litemall.db.dao.LitemallShopCheckItemMapperEx;
import org.linlinjava.litemall.db.domain.LitemallShopCheckItem;
import org.linlinjava.litemall.db.domain.LitemallShopCheckItemVo;
import org.springframework.stereotype.Service;

@Service
public class LitemallShopCheckItemService {
	@Resource
	private LitemallShopCheckItemMapper litemallShopCheckItemMapper;
	@Resource
	private LitemallShopCheckItemMapperEx litemallShopCheckItemMapperEx;

	public int create(LitemallShopCheckItem shopCheckItem) {
		shopCheckItem.setAddTime(LocalDateTime.now());
        return litemallShopCheckItemMapper.insertSelective(shopCheckItem);
    }
	
    public LitemallShopCheckItem findById(Integer id) {
        return litemallShopCheckItemMapper.selectByPrimaryKey(id);
    }
    
    public List<LitemallShopCheckItemVo> queryByShopCheckId(Integer shopCheckId) {
    	return litemallShopCheckItemMapperEx.queryByShopCheckId(shopCheckId);
    }

}
